import request from '@/config/axios'

export interface BlacklistConfigVO {
  id: number
  vehicleNo: string
  blacklistReason: number
  expireTime: Date
  enableStatus: number
  remarks: string
}

// 查询车辆黑名单列表
export const getBlacklistConfigPage = async (params: BlacklistConfigPageReqVO) => {
  return await request.get({ url: `/queue/blacklist-config/page`, params })
}

// 查询车辆黑名单详情
export const getBlacklistConfig = async (id: number) => {
  return await request.get({ url: `/queue/blacklist-config/get?id=` + id })
}

// 新增车辆黑名单
export const createBlacklistConfig = async (data: BlacklistConfigVO) => {
  return await request.post({ url: `/queue/blacklist-config/create`, data })
}

// 修改车辆黑名单
export const updateBlacklistConfig = async (data: BlacklistConfigVO) => {
  return await request.put({ url: `/queue/blacklist-config/update`, data })
}

// 删除车辆黑名单
export const deleteBlacklistConfig = async (id: number) => {
  return await request.delete({ url: `/queue/blacklist-config/delete?id=` + id })
}

// 导出车辆黑名单 Excel
export const exportBlacklistConfig = async (params) => {
  return await request.download({ url: `/queue/blacklist-config/export-excel`, params })
}
